/*************************************************
filename	: transformer.h
author		: Stefan lulham
desc		: The transformer is a component used
			  by tranformable objects. These objects
			  can have a position, scale and rotation.
*************************************************/
#ifndef D_TRANSFORMER_H
#define D_TRANSFORMER_H

#include <helpers\math\delge_math.h>

using namespace DelGE::Helpers::Math;

namespace DelGE
{
	namespace Modules
	{
		namespace Graphics
		{
			class Transformable
			{
			private:
				Vector3 oPosition;
				Vector3 oScale;
				Vector3 oRotation; // Pitch, Yaw, Roll

			protected:
				Transformable();
				virtual ~Transformable();

			public:
				void SetPosition(float fX, float fY, float fZ = 0);
				void SetPosition(const Vector3 &rPosition);
				void SetPositionX(float fX);
				void SetPositionY(float fY);
				void SetPositionZ(float fZ);
				Vector3 GetPosition();
				float GetPositionX();
				float GetPositionY();
				float GetPositionZ();

				void SetRotation(float fPitch, float fYaw, float fRoll);
				void SetRotation(const Vector3 &rRotation);
				void SetPitch(float fPitch);
				void SetYaw(float fYaw);
				void SetRoll(float fRoll);
				Vector3 GetRotation();
				float GetPitch();
				float GetYaw();
				float GetRoll();

				void SetScale(float fX, float fY, float fZ);
				void SetScale(const Vector3 &rScale);
				void SetScaleX(float fX);
				void SetScaleY(float fY);
				void SetScaleZ(float fZ);
				Vector3 GetScale();
				float GetScaleX();
				float GetScaleY();
				float GetScaleZ();

				void Translate(float fX, float fY, float fZ);				// Moves relative to position only
				void Move(float fX, float fY, float fZ);					// Moves realtive to position and orientation
				void Turn(float fPitch, float fYaw, float fRoll);			// Turn
				void Scale(float fScaleX, float fScaleY, float fScaleZ);	// Scale

				Matrix GetLocalMatrix();
			};
		}
	}
}
#endif